import { IsNotEmpty, MaxLength } from 'class-validator';

export class AddBookDto {
  @IsNotEmpty({ message: '书名不能为空' })
  @MaxLength(100, { message: '书名长度不能超过100' })
  title: string;

  @MaxLength(100, { message: '作者长度不能超过100' })
  author: string;

  @MaxLength(200, { message: '简介长度不能超过200' })
  description: string;

  corverImage: string;
  url: string;
}
